package del2;

public class JobProviderBatch implements Runnable {
    PrintQueue queue;
    String user;

    public JobProviderBatch (PrintQueue queue, String user){
		this.queue = queue;
		this.user = user;
    }

    public void run(){
    	synchronized(queue){
    		for(int i = 0; i < 10; i++){
    			queue.addJob(new PrintJob(user + " #" + (i + 1) + ": " + System.currentTimeMillis()));
    		}
    		queue.notifyAll();
    	}
    }

}
